package com.google.code.task.example;

import static com.google.code.task.Style.*;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

import com.google.code.task.example.resources.GenesisCoupeTask;
import com.google.code.task.example.resources.TiburonCoupeTask;
import com.google.code.task.example.resources.TuscanyCoupeTask;

public class AspectDecoratorExample {
  static final int RETRY_COUNT = 3;
  static final Log LOG = LogFactory.getLog(AspectDecoratorExample.class);

  public static void main(String[] args) throws Exception {
    startTask();
    new GenesisCoupeTask()
      .aspect()
        .before(new TiburonCoupeTask())
        .after(new TuscanyCoupeTask())
      .execute();
    endTask();
    
    startTask();
    aspect(
        beforeTask(new TiburonCoupeTask()),
        mainTask(new GenesisCoupeTask()),
        afterTask(new TuscanyCoupeTask())
    ).execute(); 
    endTask();
  }
}